<template>
  <uni-popup ref="groundPo" type="center">
    <view class="Ground">
      <view class="task">当前有一个转单任务</view>
      <view class="but" @click="close()">点击查看</view>
    </view>
  </uni-popup>
</template>

<script setup lang="ts">
  import { ref } from 'vue';
  import { navTo } from '@/utils/navigator';
  const groundPo = ref(null)
  const props = defineProps({
    task_id: {
      type: Number,
    }
  });
  function open() {
    groundPo.value.open()
  }
  function close() {
    groundPo.value.close()
    navTo('Sale/order/orderTake?id=' + props.task_id)
  }
  defineExpose({ open });
</script>

<style scoped lang="less">
  .Ground {
    width: 600rpx;
    background-color: white;
    border-radius: 5px;
    padding: 30rpx;
    box-sizing: border-box;

    .task {
      width: 100%;
      text-align: center;
      margin-bottom: 60rpx;
    }
  }

  .but {
    width: 284rpx;
    height: 82rpx;
    background: #1D8DFF;
    border-radius: 10rpx;
    text-align: center;
    line-height: 82rpx;
    color: #fff;
    margin: 20rpx auto 0px;
  }
</style>